package org.example.spring_security_demo1.config;

import org.example.spring_security_demo1.filter.OnceFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
//public class FilterConfig {
//
//
//    @Bean
//    public FilterRegistrationBean<OnceFilter> filterRegistrationBean(OnceFilter onceFilter) {
//        FilterRegistrationBean<OnceFilter> registrationBean = new FilterRegistrationBean<>();
//        registrationBean.setFilter(onceFilter);
//        registrationBean.addUrlPatterns("/*"); // 拦截所有请求
//        registrationBean.setOrder(1); // 设置执行顺序
//        return registrationBean;
//
//    }
//}
